الية ي رف ع الل ه ال ذي ن آ م ناوا من ك م وال ذي ن أ و تاوا ال ع ل م د ر جتا ت والل ه ب متا ت ع م لاو ن خب ي ر ال ع ظيم الل ه صد ق آل عمران الية (11) I
DEDICATION To my great parents.. To my great grandmother.. To my brothers and sisters.. To my beloved wife.. With great love. II
ACKNOWLEDGEMENT I would like to take this opportunity to express about my gratitude to all people who have supported me during the progress of the research, especially to my family for their contiguous engagement. To my supervisor Dr. Yassir Mohieddien Sabir, who suggested the idea that would become the core of my research, and his contiguous support by giving me all the equipments I needed and guiding me step by step through the stages of the research, I really regard him. To Dr. Awad Mohammed Awad AL Kareem and Dr. Seifeddien Fettouh, for giving their own time to proof-read and critique various parts of my thesis. To my teachers, those gave me the knowledge and disclose the ambiguous sides in my concerns, regards. To my uncle Mohammed Farah for his considerable help. Also to Benya and Soul Engineering Companies for their helps, and allowing me their office spaces to work. To my colleagues, those share the hardness of learning with me. All of you have formed a pillar of strength for me throughout this research; thank you very much. Before all of these, at first and last (Alhamdu Lillahi) very much. III
ال م س ت خ لص إ ن نعمنننلية نالنختينارن نبينن نظنمإننندارة نقونننعادنن نالنبيناننات نانلجنن انية نأمنر لبنسيننننننالنسنهنل نن فإ ن تنب نن فني يتنمبنننالنستننادن نإلنى منعاننيني محنددننة تسانعدننن ي ف ضنلأنننن سخ نانل جننناننية نانلتنناحة نإحندى نالن ن هذا نالنختينارن. ع م د هذا البحث إلى تحقيق مجموعة من الأهداف هي إجراء عملية مقارنة بين ال ن سخ نانل جنننانن ية من نظنمإنندنارة نقونننعادنن نالنبيناننات نعبنن ناثننين من نأكنث هنذهنن نالن نظم شيونع اننن ونق وننن ة هما OracleXE و Postgres كما عمد أيض ا إلى إعطاء فكرة عن عملية الته جير / التحويل بين نظم إدارة قواعد البيانات وتسليط الضوء على الن.Benchmark لتحقيق هذه الهداف تم إ تباع النهج الوصفي لعطاء نبذة تعريفية عن كل واحد من ال ن ت جي ) Oracle و (Postgres وإجراء مقارنة نظرية بينهما. وت م إنشاء قاعدة بيانات في Oracle لجراء التطبيقات عليها. ومن ث م تم تهجيها إلى عملية التهجي وأنواع التهجي والخطوات اللزمة لنجاز هذه العملية. Postgres مع التكي على الدوات الستخدمة في بعد ذلك ت م استعراض كيفية إستخلص معلومات عن الكفاءة في Oracle باستخدام التسهيلت الوجودة فيه. كما ت م استعراض كيفية إجراء إختبار الن برنامج مت خ ص ص لهذا الغرض هو ثم تمت مراقبة ك ل من نظامي Benchmark.Swingbench Oracle و Postgres ManageEngine العلومات لكل من الرسومية. في Oracleباستخدام باستخدام برنامج متخصص هو واستخلصمعلوماتعن الكفاءة لك ل منالم ن ت جين.ومن ثمت متمقارنة هذه Oracle أ و ضح هذا البحث أنه أو.Postgres و وت م إجراء مقارنات توضيحية باستخدام الخططات ل توجد إمكانات للتهجير من نظام إدارة قواعد بيانات إلى آخر بحيث ي ح ص ل على الكائنات والبيانات بنسبة ضئيلة من الخطأ بعد عملية التهجي. ثانيا وفيما يتعلق بالكفاءة فإ ن كل الن ت جي يوفران حلو ل م ر ضي ة بعض الش إ ل أن ي ع د الأكثر كفاء ة حسب التطبيق المستخدم في البحث. - Postgres مفتوح الصدر - تت ل خص نتائج الدراسة في أ ن OracleXE يصلح لقواعد البيانات الصغية كما أ نه يصلح في الحالت الت ي ر غب في أ ن تكون بعض الخصائص الضافية فيها مدعومة مثل الن Materialized IV
.View أما Postgres فيصلح مع قواعد البيانات الضخمة الت تحتوي على كم هائل من البيانات. يوص هذا البحث بمجموعة من الواضيع الت تتط لب الزيد من الدراسة والبحث مثل التع مق في دراسة الخطاء الناتجة عن عملية التهجي وتطوير أدوات لجراء إختبارات الن Benchmark ABSTRACT في الن.Postgres The selection of freeware DBMS is not an easy matter, that adopting one of available versions is better to be done depending on specific criteria helps in such selection. This research intended to achieve a number of aims those are: comparing free DBMS products through two of the most common and strongest, Oracle and Postgres. The study also intends to highlight the process of migration among DBMS products. Also to give an idea about the benchmarking. In order to achieve these objectives, the descriptive methodology followed to give introductory definition about Oracle and Postgres, then theoretically compare them. Also sample database created to make applications on it, migrate it to Postgres concerning the tools, types and the steps to accomplish the migration process. After that, it has been showed how the performance information extracted using the existed facilities in Oracle, also it had been showed how to perform Oracle benchmark test using professional program for this purpose, which is swingbench. Then, both Oracle and Postgres monitored using professional program ManageEngine, and performance information extracted. Then compare the extracted performance information, and the illustrated comparisons are done using the graphical charts. This research explained the possibilities to migrate from one DBMS to another, ensuring migrated all objects and data with least errors. In term of performance, both products provide considerable solutions, where Postgres is more efficient. V
The results of this research are summarized in that, OracleXE is suitable for the small databases, also in the cases of the supported additional features (materialized view). Whereas Postgres is suitable with the large databases contain huge amount of data. The research recommends a group of topics to be studied and researched such as studying the migration errors deeply, and to developed benchmark tools for Postgres. LIST OF ABBREVIATIONS ACID ADDMI ASH API ASM AWR BSD DBA DBMS GPL ISAM JDBC OCI ODBC OLTP RAID RBAC RDB SQL Atomicity, Consistency, Isolation, Durability Automatic Database Diagnostic Monitor Active Session History Application Program Interface Automated Storage Management Automatic Workload Repository Berkeley Software Distribution Database Administration Database Management System General Public License Indexed Sequential Access Method Java Database Connectivity Oracle Call Interface Oracle Database Connectivity Online Transaction Processing Redundant Array of Inexpensive Disks Rule Base Access Control Relational Database Structured Query Language VI
VII
LIST OF FIGURES Figure Page Figure Name No No 2.1 PostgreSQL architecture 10 3.1 Oracle objects migrated with EnterpriseDB Migration Studio. 14 3.2 Migration Tools.. 15 3.3 Migration Studio, migration modes 26 3.4 Offline Migration 27 3.5 Online migration dialog box... 29 3.6 Connection to an instance of Advanced Server is not established. 33 4.1 RDBMS s Maximum DB Sizes in Gigabyte. 45 4.2 RDBMS s Maximum Table Sizes in Gigabyte.. 45 4.3 RDBMS s Maximum row Sizes in Kilobyte.. 46 4.4 RDBMS s Maximum Number of Columns per Row. 46 4.5 RDBMS s Maximum Columns Name Sizes in Characters 47 4.6 RDBMS s Maximum BLOB/CLOB Sizes 48 4.7 RDBMS s Maximum CHAR Sizes 48 4.8 RDBMS s Maximum NUMBER Sizes.. 49 4.9 RDBMS s Minimum Date Value.. 49 4.10 RDBMS s Maximum Date Value.. 50 5.1 Migrated object in Postgres environment... 61 5.2 pgadmin, Analyze.. 65 5.3 Application Manager, Monitor Group 66 5.4 ManageEngine Application Manager Splash Screen.. 67 5.5 ManageEngine Application Manager Logon Interface.. 67 5.6 Available Servers to be Monitored in ManageEngine 68 5.7 Create New Monitor in ManageEngine.. 68 5.8 Create Oracle Monitor into KhalidGroup in ManageEngine.. 69 5.9 Create PostgreSQL Monitor into KhalidGroup in ManageEngine. 69 5.10 KhalidGroup Monitor Group and its Monitors in ManageEngine. 70 5.11 Getting Report of KhalidGroup Monitor Group in ManageEngine... 70 5.12 Report of Oracle Monitor from ManageEngine. 71 5.13 Report of Postgres Monitor from ManageEngine... 71 5.14 Connection Report of Oracle Monitor from ManageEngine.. 72 5.15 Connection Report of Postgres Monitor from ManageEngine... 72 5.16 CPU time consumption. 75 5.17 Time consumption sharing with other application 75 5.18 Memory consumption... 76 5.19 I/O Read Times. 76 5.20 Read Bytes 77 5.21 Write times 77 5.22 Written Bytes 78 5.23 Oracle Results Summarization.. 79 VIII
5.24 PostgreSQL Results Summarization. 79 IX
LIST OF TABLES Table Page Table Name No No 1.1 The conventions used in the research. 5 2.1 Free commercial database limitations 11 3.1 Migration Functionality Comparison. 16 4.1 RDBMSs maintainer, release dates and licenses.. 39 4.2 RDBMSs operating system support.. 42 4.3 RDBMSs fundamental features 43 4.4 RDBMSs objects sizes limits.. 44 4.5 RDBMSs data-types sizes limits. 47 4.6 RDBMSs table and view support. 50 4.7 RDBMSs indexes view support 51 4.8 RDBMSs database capability 52 4.9 Some RDBMSs objects availability... 53 4.10 Partitioning methods those RDBMSs support. 53 4.11 Access controls supported by RDBMSs.. 54 5.1 Oracle Performance Information 73 5.2 Postgres Performance Information. 73 5.3 RDBMSs Performance Information.. 74 X
TABLE OF CONTENTS CHAPTER 1: INTRODUCTION 1.1 Background.. 1 1.2 Motivation... 1 1.3 Problem Definition... 2 1.4 Research Objectives. 3 1.5 Scope and Assumptions... 3 1.6 Methodology... 4 1.7 How this Research Organized.. 4 1.8 Conventions.. 5 CHAPTER 2: SOFTWARE PROCESS AND AGILE OVERVIEW 2.1 Introduction.. 6 2.2 Oracle Database Overview... 6 2.2.1 Administrating an Oracle Database.. 6 2.2.1.1 Types of Oracle Database Users.. 6 2.2.1.2 Oracle Database Administrators. 7 2.2.2 Oracle XE Database. 7 2.3 PostgreSQL Overview.. 7 2.3.1 Essence of PostgreSQL 8 2.3.2 A Short History of PostgreSQL 8 2.3.3 PostgreSQL Features 9 2.3.4 PostgreSQL Architecture.. 9 2.3.5 Data Access with PostgreSQL.. 10 2.3.6 Restrictions of Postgres and Commercial DBMS Products. 11 2.3.6.1 Limitations of Commercial DBMS Products... 11 2.3.6.2 Limitations of PostgreSQL.. 12 CHAPTER 3: MIGRATION 3.1 Introduction.. 13 3.2 Migration Tools... 13 3.3 Migration Methodology... 17 3.3.1 The Migration Process... 17 3.3.2 Connecting an Application to Advanced Server... 19 3.3.3 An Oracle Migration Steps... 19 3.3.3.1Migration Preparation... 20 3.3.3.2 Migration Execution. 22 3.3.3.3 Migration Validation. 24 3.3.3.4 Migration Testing. 25 3.3.3.5 Tuning the Migrated System. 25 3.4 Online vs. Offline Migration. 26 3.5 Offline Migration.. 27 3.6 Online Migration... 29 3.7 The Migration Summary... 31 3.8 Post Migration... 32 XI
3.8.1 Migration Studio Connection Errors... 33 3.8.2 Migration Studio Migration Errors. 33 3.8.3 Unsupported Oracle Features.. 36 3.9 Summary... 37 CHAPTER 4: THEORETICAL COMPARISON 4.1 Introduction.. 39 4.2 Features of Oracle. 39 4.3 Features of PostgreSQL... 40 4.4 Oracle vs. PostgreSQL.. 41 4.4.1Operating System Support.... 42 4.4.2 Fundamental Features.... 43 4.4.3 Limits.. 43 4.4.3.1 Objects Limits. 44 4.4.3.2 Some Data-Types Limits. 47 4.4.4 Tables and Views.... 50 4.4.5 Indexes.... 51 4.4.6 Database Capabilities.. 52 4.4.7 Some Objects Support... 52 4.4.8 Partitioning.. 53 4.4.9 Access Control.... 54 CHAPTER 5: PERFORMANCE TESTS AND ANALYSIS AND VISUALIZATION OF THE RESULTS 5.1 Testing Oracle Performance. 55 5.1.1 Tracing... 55 5.1.2 TKPROF..... 57 5.1.3 Using Trace Facility and TKPROF. 57 5.1.4 Oracle AWR..... 59 5.1.5 Oracle Benchmark Tests..... 60 5.2 The Database in PostgreSQL.... 61 5.3 Hits on PostgreSQL Performance Tuning.... 61 5.3.1 Hardware Considerations.... 62 5.3.2 Tuning SQL Code... 62 5.3.3 PostgreSQL Explain Analyze. 64 5.3.4 PostgreSQL pgbench Tool.. 65 5.4 ManageEngine Application Manager... 66 5.4.1 Oracle Performance Statistics. 73 5.4.2 PostgreSQL Performance Statistics... 73 5.5 Comparison of Oracle and PostgreSQL Performance. 74 5.5.1 Analysis and Visualization of the Results.. 74 5.5.2 The Results Summarization... 78 CHAPTER 6: CONCLUSIONS AND RECOMMENDATIONS 6.1 Preface... 80 6.2 Conclusions... 80 6.3 Results Discussion 81 6.4 Recommendations. 81 6.5 Limitations 82 XII
6.6 Learned Lessons 82 REFERENCES 83 APPENDICES Appendix A: Oracle database creation. i Appendix B: The Migration.. v Appendix C: Oracle AWR xxi Appendix D: Oracle Benchmark Test.. xxx XIII